<include file='Public/header'/>
	<body>
		<div class="mui-content">
		    <header class="mui-bar mui-bar-nav pub_head">
		        <a class="mui-action-back mui-icon mui-pull-left iconfont icon-left" href="javascript:history.go(-1)"></a>
		        <h1 class="mui-title">留言</h1>
		    </header>
		    <div class="leave_content">
			    <div class="leave_list_tit mTop">
			    	<div class="leave_tit_cont">
				    	<p>感谢您对本幼儿园的大力支持！</p>
				    	<p>电话：{$data['phone']}</p>
				    	<p>如有意见，请填写下表:</p>
			    	</div>
			    </div>
			    
			    <!-- <div class="leave_feedback">
			    	<p>反馈类型</p>
			    	<div class="leave_back">
				    	<select name="type">
				    		<option value="1">对幼儿园的建议或意见</option>
				    		<option value="2">2</option>
				    		<option value="3">3</option>
				    	</select>
						<i class="iconfont icon-jiantou leave_select"></i>
					</div>
			    </div> -->
			    
			    <div class="leave_opinion">
			    	<p>意见建议</p>
			    	<textarea class='content'></textarea>
			    </div>
			    
			    <div class="leave_contact">
			    	<p>联系方式</p>
			    	<input type="text"  name='phone' class='phone'/>
			    </div>
		    </div>
		    <div class="leave_submit">
		    	<a href="#">
			    	<i class="iconfont icon-bianjikuai"></i>
			    	<span>提交</span>
		    	</a>
		    </div>
		</div>
		<script type="text/javascript">
		
			$('.leave_submit').on('click',function(){
				var phone = $('.phone').val();
				var content = $('.content').val();
				var id = {$data.uid};
				if(content == ''){
					layer.open({
						content:'请输入反馈内容',
						skin:'msg',
						time:1
					});
					return false;
				}
				$.ajax({
					type:"post",
					url:"{:U('FeedBack/index')}",
					async:false,
					data:{phone:phone,content:content,id:id},
					dateType:"json",
					success:function(data){
						if(data.res == 1){
							layer.open({
								content:data.msg,
								btn:['确定'],
								yes:function(index){
									 location.reload();
									layer.close(index);
								}
							});							
						}else if(data.res == 0){
							layer.open({
								content:data.msg,
								btn:['确定'],
								yes:function(index){
									 location.reload();
									layer.close(index);
								}
							});
						}
					}
				});
				
				
			});
		</script>
	</body>
<include file='Public/footer'/>
